//
//  pciTableViewCell.m
//  A1.0
//
//  Created by lanou3g on 15-3-26.
//  Copyright (c) 2015年 ccandxx. All rights reserved.
//

#import "pciTableViewCell.h"

@implementation pciTableViewCell

- (void)awakeFromNib {
    
//    CGRect rect = [self.title.text boundingRectWithSize:CGSizeMake([UIScreen mainScreen].bounds.size.width - 20, 2000) options:(NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17.0f]} context:nil];
//    
//    CGRect temp = self.title.frame;
//    temp.size.height = rect.size.height;
//    self.title.frame = temp;
    

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        
        
    }
    return self;
}



+ (CGFloat)cellFloatWithModel:(picModel *)model
{
    //label自适应
    CGRect rect = [model.title boundingRectWithSize:CGSizeMake([UIScreen mainScreen].bounds.size.width - 20, 2000) options:(NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17.0f]} context:nil];
    
    
    
    CGFloat h =  rect.size.height;
    
    CGRect rx = [ UIScreen mainScreen ].bounds;

    h = h + (model.pic_h *( rx.size.width - 20) / model.pic_w) + 130;
    
    
    return h;
}


@end
